// import { IClientOptions } from 'mqtt';

export interface ICommonParams {
	body?: unknown;
	cookie: { [name: string]: string };
	data: unknown;
	headers: {
		[key: string]: string;
	};
	params: unknown;
	query: unknown;
	remote_address: string;
	spaceid: string;
	url: string;
	[key: string]: unknown;
}

export interface IWebResult {
	data?: unknown;
	buff?: Buffer;
	cookie?: { [name: string]: string };
	content_type?: string;
	headers?: {
		[key: string]: string;
	};
	attachment?: string;
	redirect?: string;
	status_code?: number;
}

export type IAtom = (...args: Array<unknown>) => Promise<unknown> | unknown;

export interface IAtoms {
	[atom: string]: IAtom;
}

export interface IActions {
	[atom: string]: IAtom;
}

export type IFire = (action: string, ...args: Array<unknown>) => Promise<unknown>;

export interface IFeidaoAi {
	fire: IFire;
	fire_action: IFire;
	fire_nools: IFire;
}

export interface IFeidaoData {
	readonly fire: IFire;
	readonly fire_action: IFire;
	readonly fire_nools: IFire;
	// readonly server?: string;
	readonly spaceid?: string;
	readonly params?: unknown;
}

export interface ISession {
	readonly feidao: IAtoms;
	readonly feidao_when: IAtoms;
	readonly feidao_then: IAtoms;
	feidao_data: IFeidaoData;
}

export interface IMessageContent {
	condition: unknown;
	spaceid: string;
	modelid: string;
}

export interface IHeaders {
	actionid: string;
	messagetype: string;
	sessionid: string;
	spaceid: string;
}
